package com.lhp.demo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lhp.demo.client.GetDcClient;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
@Service
public class GetDcService {
	
    @Autowired
    GetDcClient getDcClient; 
	
    @HystrixCommand(fallbackMethod = "addServiceFallback")
    public String addService() {
        return getDcClient.getdc();
    }
    public String addServiceFallback() {
        return "error";
    }
}
